type LookUp<U extends { type: string }, T extends U['type']> = U extends { type: T } ? U : never

// 联合类型 extends 会枚举